package com.kedou.sdk.params;

import android.os.Parcel;
import android.os.Parcelable;

import com.kedou.sdk.core.HttpEngineApi;
import com.kedou.sdk.params.bean.RoleInfo;

/**
 * Created by Administrator on 2017/6/9 0009.
 */

public class RoleInfoRequestParams extends BaseRequestParams implements Parcelable{

    private static final String SERVICE = "roleReport";

    private String server_name;
    private String role_name;
    private String server_num;
    private String role_level;
    private String role_id;
    private String trumpet_user_id;



    public RoleInfoRequestParams(String gameId, RoleInfo roleInfo){
        setGameId(gameId);

        if(roleInfo != null){
            this.server_num = roleInfo.getServerId();
            this.server_name = roleInfo.getServerName();
            this.role_id = roleInfo.getRoleId();
            this.role_name = roleInfo.getRoleName();
            this.role_level = roleInfo.getRoleLevel();
            this.trumpet_user_id = HttpEngineApi.getInstance().getEngineConduits().readLastLoginSmallAccount();
        }
    }



    public String getServer_name() {
        return server_name;
    }

    public void setServer_name(String server_name) {
        this.server_name = server_name;
    }

    public String getRole_name() {
        return role_name;
    }

    public void setRole_name(String role_name) {
        this.role_name = role_name;
    }

    public String getRole_level() {
        return role_level;
    }

    public void setRole_level(String role_level) {
        this.role_level = role_level;
    }

    public String getRole_id() {
        return role_id;
    }

    public void setRole_id(String role_id) {
        this.role_id = role_id;
    }

    public String getServer_num() {
        return server_num;
    }

    public void setServer_num(String server_num) {
        this.server_num = server_num;
    }

    public String getTrumpet_user_id() {
        return trumpet_user_id;
    }

    public void setTrumpet_user_id(String trumpet_user_id) {
        this.trumpet_user_id = trumpet_user_id;
    }

    @Override
    public String getServiceString() {
        return SERVICE;
    }





    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeString(this.server_num);
        dest.writeString(this.server_name);
        dest.writeString(this.role_id);
        dest.writeString(this.role_name);
        dest.writeString(this.role_level);
        dest.writeString(this.trumpet_user_id);


    }

    protected RoleInfoRequestParams(Parcel in) {
        super(in);
        this.server_num = in.readString();
        this.server_name = in.readString();
        this.role_id = in.readString();
        this.role_name = in.readString();
        this.role_level = in.readString();
        this.trumpet_user_id = in.readString();

    }

    public static final Creator<RoleInfoRequestParams> CREATOR = new Creator<RoleInfoRequestParams>() {
        @Override
        public RoleInfoRequestParams createFromParcel(Parcel source) {
            return new RoleInfoRequestParams(source);
        }

        @Override
        public RoleInfoRequestParams[] newArray(int size) {
            return new RoleInfoRequestParams[size];
        }
    };
}
